package com.ty.day4;

import java.util.Scanner;

/**
 * Created by IntelliJ IDEA.
 *
 * @author : txy
 * @create : 2023/11/9 9:52
 */
public class One {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入分数：");
        double score= sc.nextDouble();
        if (score<0||score>100){
            System.out.println("格式不对");
            return;
        }
        if (score<60){
            System.out.println("E");
        } else if (score<70){
            System.out.println("D");
        }else if (score<80){
            System.out.println("C");
        }else if (score<90){
            System.out.println("B");
        }else {
            System.out.println("A");
        }
        switch ((int) (score/10)){
            default:
                System.out.println("E");
                break;
            case 6:
                System.out.println("D");
                break;
            case 7:
                System.out.println("C");
                break;
            case 8:
                System.out.println("B");
                break;
            case 9:
            case 10:
                System.out.println("A");
                break;
        }
    }
}
